package com.jjw.springbootcvs.mapper;


import com.jjw.springbootcvs.pojo.dto.SysUserAndSysRoleDTO;
import com.jjw.springbootcvs.pojo.entity.SysUser;
import com.jjw.springbootcvs.pojo.vo.PageUserListVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author xiaojuan
 * @Date 2024/11/1
 * @Description
 */

public interface SysUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    SysUser login(@Param("userName") String userName,@Param("password") String password);

    List<PageUserListVO> getAllUserListPage(SysUserAndSysRoleDTO sysUserAndSysRoleDTO);

    SysUser getUesrByAccount(String code);

    SysUser getByPassword(Long id, String oldPassword);

    void updateByPassword(Long id, String newPassword);
}